package Exc.mapper;

import Exc.domain.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 问题Ip监控接口、一般删除操作（根据源IP删除）、DDos删除（根据目的IP删除）
 *
 * @author fengke
 */
public interface IpMonitoringMapper {

    /**
     * 红色代码
     *
     * @return list list
     */
    List<PortAndProtocol> listRedCode();

    /**
     * List opasoft list.
     *
     * @return the list
     */
    List<PortAndProtocol> listOpasoft();

    /**
     * List slammer list.
     *
     * @return the list
     */
    List<PortAndProtocol> listSlammer();

    /**
     * List shock wave list.
     *
     * @return the list
     */
    List<PortAndProtocol> listShockWave();

    /**
     * List welchia list.
     *
     * @return the list
     */
    List<PortAndProtocol> listWelchia();

    /**
     * List blaster list.
     *
     * @return the list
     */
    List<PortAndProtocol> listBlaster();

    /**
     * List single flow list.
     *
     * @return the list
     */
    List<PortAndProtocol> listSingleFlow();

    /**
     * Gets ip and port count.
     * 获取源IP和目的端口
     * @return the ip and port count
     */
    List<IpAndPortCount> getIpAndPortCount();

    List<PortAndIpCount> getPortAndIpCount();

    /**
     * List smurf list.
     *
     * @return the list
     */
    List<PortAndProtocol> listSmurf();

    /**
     * List land list.
     *
     * @return the list
     */
    List<PortAndProtocol> listLand();

    /**
     * Dos监测
     *
     * @return list list
     */
    List<Dos> listDos();

    /**
     * DDos监测
     *
     * @return list list
     */
    List<DDos> listDDos();

    /**
     * 通用删除操作,需要根据源IP地址删除
     *
     * @param ip the ip
     */
    void delete(@Param("ip")String ip);

    /**
     * 删除DDos
     *
     * @param ip the ip
     */
    void deleteDDos(@Param("ip") String ip);

    /**
     * 源IP TopN监控
     *
     * @return the list
     */
    List<FromIpTop> listTop();


    /**
     * List blackmail list.
     *
     * @return the list
     */
    List<Blackmail> listBlackmail();

    /**
     * List dns blackmail.
     *
     * @return the blackmail
     */
    List<Blackmail> listDns();
}
